const mysql=require('mysql');
const client=mysql.createConnection({
    host:'localhost',
    user:'root',
    password:'',
    database:'maisi',
    port:'3306'

})

function sqlQuery(sql,arr,callback){
    client.query(sql,arr,function(error,result){
        if(error){
            console.log('连接失败');
            return;
        }
        callback(result);
    })
}


module.exports=sqlQuery;